{% extends "base_portadmin.html" %}

{% block mainheading %}{{ block.super }} \ {{ cst.name }} \ Information{% endblock %}

{% block object-tools %}
    <ul class="object-tools">
        <li><a href="/export/cst/{{ cst.pk }}/">Export to XLS</a></li>
    </ul>
{% endblock %}

{% block content %}
    <table>
        <tr>
            <td>

                <div>Information about {{ cst.name }} ({{ cst.status_name }})</div>
                <div>
                    <label>Timelevel:</label>
                    {{ cst.timelevel_m }}<br />
                    <label>Label:</label>
                    {{ cst.label }}<br />

                </div><br />

                <div style="float: left; width: 460px; min-height: 300px;">
                    <strong>{{ cst.market_direction_1 }}</strong><br />
                    {% include "portadmin/_market_info.html" with market=cst.market_direction_1.market_id %}
                    <label>Cash or Future</label>:
                    {{ cst.market_direction_1.cash_or_future_name }}<br />
                    <label>Day begin</label>:
                    {{ cst.market_direction_1.day_begin }}<br />
                    <label>Day end</label>:
                    {{ cst.market_direction_1.day_end }}<br />
                    <label>Source code</label><br />
                    <textarea rows="20" cols="60" readonly="true" style="font-family: Courier New">
                        {{ cst.market_direction_1.source_code }}
                    </textarea>
                </div>

            {% if cst.market_direction_2 != None %}
                <div style="float: left; width: 460px; min-height: 300px;">
                    <strong>{{ cst.market_direction_2 }}</strong><br />
                    {% include "portadmin/_market_info.html" with market=cst.market_direction_2.market_id %}
                    <label>Cash or Future</label>:
                    {{ cst.market_direction_2.cash_or_future_name }}<br />
                    <label>Day begin</label>:
                    {{ cst.market_direction_2.day_begin }}<br />
                    <label>Day end</label>:
                    {{ cst.market_direction_2.day_end }}<br />
                    <label>Source code</label><br />
                    <textarea rows="20" cols="60" readonly="true" style="font-family: Courier New">
                        {{ cst.market_direction_2.source_code }}
                    </textarea>
                </div>
            {% endif %}

            </td>
        </tr>
    </table>

{% endblock %}
